window.wallpaperPropertyListener = {
  applyUserProperties: function (properties) {
    // $('.bottom').html(properties.positionvalue.value);
    if (properties.background) {
      if (properties.background.value) {
        let bg = document.querySelector(".bg");
        bg.style.backgroundImage = 'url(' + 'file:///' + properties.background.value + ')';
      }
    }
    if (properties.ispositiondefined) {
      if (!properties.ispositiondefined.value) {
        $('.main').css('justify-content', 'center');
        $('.main').css('margin-left', 0);
      } else {
        $('.main').css('justify-content', 'start');
      }
    }
    if (properties.positionvalue) {
      $('.main').css('margin-left', properties.positionvalue.value + '%');
    }
  },
};